package top.infopub.enums.mkt;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author Warking
 * @Date 2021/5/1 6:41
 * @Version 1.0    营销费用类型的枚举类
 */
public enum  StatusMarketingExpenses {
    EXPENSE_TYPE1("1", "标书制作费用"),
    EXPENSE_TYPE2("2", "营销招待费用"),
    EXPENSE_TYPE3("3", "专家费用"),
    EXPENSE_TYPE4("4", "合作费用"),
    EXPENSE_TYPE5("9", "其他费用");



    private String code;

    private String name;

    StatusMarketingExpenses (String code, String name) {
        this.code = code;
        this.name = name;
    }


    public static List<Map<String, String>> asList() {
        List<Map<String, String>> list = new ArrayList<>();
        Map<String, String> map;
        for (StatusMarketingExpenses sme : StatusMarketingExpenses.values()) {
            map = new HashMap<>();
            map.put("code", sme.getCode());
            map.put("name", sme.getName());
            list.add(map);
        }
        return list;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
